package com.boe.hbd.server.dao;

import java.util.List;

import com.boe.hbd.server.model.Pic;

public class PicDao extends BaseDao {

	private static PicDao instance = new PicDao();

	private PicDao() {
	}

	public static PicDao getInstance() {
		return instance;
	}

	public Pic findPic(int id) {
		return (Pic) find("findPic", id);
	}

	public List<Pic> findPicsByViewId(int viewId) {
		return findList("findPicsbyViewID", viewId);
	}

	public List<Pic> findPicsByUserId(int userId) {
		return findList("findPicsbyUserID", userId);
	}

	public int findMaxSeq() {
		return (Integer) findObject("findMaxSeq");
	}

	public void insert(Pic pic) {
		insert("insertPic", pic);
	}
}
